package com.demo.enums;
/**
 * 1正常  2值班  3隐身
 */
public enum UserWorkStatusEnum {
    ZHENG_CHANG(1, "正常"),
    ZHI_BAN(2, "值班"),
    YIN_SHEN(3, "隐身");

    private int value;
    private String desc;

    public int getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    UserWorkStatusEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static UserWorkStatusEnum getByValue(Integer value) {
        for (UserWorkStatusEnum item : values()) {
            if (item.getValue() == value) {
                return item;
            }
        }
        return null;
    }
}
